import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

public class Test {
    public static void main(String[] args) throws Exception {
        InputStream is=new FileInputStream("C:\\Users\\86183\\Desktop\\java学习" +
                "\\java-learning\\J2023_11_6_6\\src\\haha");
        //开始读取文件中的字节数据，每次读取3个字节
        byte[] buffer=new byte[3];
       int len= is.read(buffer);
       String s=new String(buffer);
        System.out.println(s);
        System.out.println(len);
        byte[] buffer1=new byte[3];

        /*int len1= is.read(buffer);
        String s1=new String(buffer);
        System.out.println(s1);
        System.out.println(len1);
   */
        int len1= is.read(buffer);
        String s1=new String(buffer,0,len1);
        System.out.println(s1);
        System.out.println(len1);
        int len2=is.read(buffer);
        System.out.println(len2);
        is.close();



    }


}
